package main.Q1701_1800;

import java.util.Arrays;

public class Q1751_1760 {
    public static void main(String[] args) {
        System.out.println("Question1751：");
        System.out.println("Question1752：");
        System.out.println("Question1753：移除石子的最大得分");
        System.out.println("Question1754：");
        System.out.println("Question1755：");
        System.out.println("Question1756：");
        System.out.println("Question1757：");
        System.out.println("Question1758：");
        System.out.println("Question1759：");
        System.out.println("Question1760：袋子里最少数目的球");
    }
}

class Question1753 {
    public int maximumScore(int a, int b, int c) {
        if (a > b + c) return b + c;
        if (b > a + c) return a + c;
        if (c > a + b) return a + b;
        return (a + b + c) / 2;
    }
}

class Question1760 {
    public boolean process(int[] nums, int c, int maxOperations) {
        int sum = 0;
        for (int x : nums) {
            sum += (x - 1) / c;
        }
        return sum <= maxOperations;
    }

    public int minimumSize(int[] nums, int maxOperations) {
        Arrays.sort(nums);
        int l = 0, r = nums[nums.length - 1] + 1;
        while (l + 1 < r) {
            int c = l + (r - l) / 2;
            if (process(nums, c, maxOperations)) r = c;
            else l = c;
        }
        return r;
    }
}